package com.itfenghuang.day02;

import java.util.ArrayList;

public class A04_练习 {
    public static void main(String[] args) {


        ArrayList arrayList = new ArrayList();
        arrayList.add("猪八戒");
        arrayList.add("孙悟空");
        arrayList.add("沙和尚");
        arrayList.add("铁扇公主");
        System.out.println(arrayList.size());
        System.out.println(arrayList);
        Object o = arrayList.get(3);
        System.out.println(o);
        arrayList.remove(3);
        System.out.println(arrayList);
        arrayList.set(0,"猪悟能");
        System.out.println(arrayList);
        arrayList.remove(2);
        System.out.println(arrayList);
        arrayList.remove("猪悟能");



    }
}

